<%@page contentType="text/html;charset=utf-8" %>
<%@taglib prefix="s" uri="/struts-tags" %> 
<script type="text/javascript">
function showchannelapp(channelId,appnumber)
{
	 var sWidth, sHeight;
    sWidth = Math.max(document.body.scrollWidth, document.documentElement.scrollWidth); 
    sHeight =Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); 
    var bgObj = document.getElementById("bgDiv"); 
    bgObj.style.position = "absolute";
    bgObj.style.top = "0";
    bgObj.style.background = "#817977";
    bgObj.style.filter = "progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=40,finishOpacity=60)";
    bgObj.style.opacity = "0.4";
    bgObj.style.left = "0";
    bgObj.style.width = sWidth + "px";
    bgObj.style.height = sHeight + "px";
    bgObj.style.zIndex = "10000";
    
    var msgObj = document.getElementById("msgDiv");
    msgObj.style.position = "absolute";
    msgObj.style.left = "50%";
    msgObj.style.top = "50%";
    msgObj.style.marginLeft = "-300px";
    msgObj.style.marginTop = -75 + document.documentElement.scrollTop + "px";
    msgObj.style.lineHeight = "25px";
    msgObj.style.zIndex = "10001";
    msgObj.style.display="";
    bgObj.style.display="";
    var url      = "mg/appquery/channelapp.do";
    var content  = "channelId=" + channelId
                  + "&appnumber=" + appnumber;
    var objectid = "msgDiv";
    sendXMLHttpRequest(url, content, objectid);
}
</script>
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="5"></td>
    <td>
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td colspan="8">
       <table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><img src="images/table_top_left.jpg" width="20" height="15" /></td>
            <td><img src="images/table_top_bg.jpg" width="770" height="15"/></td>
            <td align="right"><img src="images/table_top_right.jpg" width="20" height="15" /></td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="25" colspan="<s:property value="%{getQueryDimensionCount(dimension)+2}"/>" 
        class="table_blue">　<strong><img src="images/dot.jpg" width="13" height="9">查询结果</strong></td>
    </tr> 
    <s:if test="hasActionErrors()"> 
    <tr>
      <td class="table_w1" colspan="8" align="center">
        <strong><font color="red"><s:actionerror /></font></strong>
      </td>
    </tr>
    </s:if>
    <tr>
    <td>
    <table id="sort_table" width="100%" border="0" cellspacing="0" cellpadding="0"
           style="word-break:break-all;">
    <tr>
        <td align="center" class="table_g1" width="5%">ID</td>
        <td align="center" class="table_g2" width="35%">应用编号</td>
        <td align="center" class="table_g2" width="15%">应用名称</td>
        <td align="center" class="table_g2" width="10%">CP</td>
        <td align="center" class="table_g2" width="10%">包名</td>
        <td align="center" class="table_g2" width="10%">版本</td>
        <td align="center" class="table_g2" width="10%">入口</td>
        <td align="center" class="table_g2" width="5%">状态</td>
      </tr>
    <tbody id="sort_body">
    <s:if test="list.size()>0" >
    <s:iterator value="list" status="stat1" >    
    <tr onmouseover="this.style.background='#c0c0c0';" 
        onmouseout="this.style.background='#ffffff';" 
        onclick="showchannelapp('<s:property value="channelId" />','<s:property value="appnumber" />')"
         title="点击查看渠道包信息" style="cursor:pointer">
          <td class="table_w1" align="center"><s:property value="#stat1.index+1" /></td>
          <td class="table_w2" align="center"><s:property value="appnumber" /></td>
          <td class="table_w2" align="center"><s:property value="appname" /></td>
          <td class="table_w2" align="center"><s:property value="%{getcpname(cpid)}" /></td>
          <td class="table_w2" align="center"><s:property value="apppackage" /></td>
          <td class="table_w2" align="center"><s:property value="appversion" /></td>
          <td class="table_w2" align="center"><s:property value="appentry" /></td>
          <td class="table_w2" align="center">
	       <s:property value="%{getConstantString('cpapp status',appstatus)}" />
          </td>
     </tr>
    </s:iterator>
    </s:if>
    <s:else>    
    <tr>
      <td class="table_w1" align="center" colspan="8">无</td>
    </tr>
    </s:else>
    </tbody>
    </table>
    </td>
    </tr>
    <tr> 
      <td colspan="8" background="images/table_bom_bg.jpg">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="images/table_bom_left.jpg" width="20" height="15"></td>
          <td></td>
          <td align="right"><img src="images/table_bom_right.jpg" width="20" height="15"></td>
        </tr>
        </table>
      </td>
    </tr>
  </table>  
  </td>
  <td width="5"></td>
  </tr>
  </table>
